#include "Common/Algebra/Vec4.h"

namespace cmn {

	Vec4 Vec4::operator += ( const Vec4& v ) {
		X += v.X;
		Y += v.Y;
		Z += v.Z;
		W += v.W;
		return *this;
	}

	Vec4 Vec4::operator -= ( const Vec4& v ) {
		X -= v.X;
		Y -= v.Y;
		Z -= v.Z;
		W -= v.W;
		return *this;
	}

	Vec4 Vec4::operator *= ( float a ) {
		X *= a;
		Y *= a;
		Z *= a;
		W *= a;
		return *this;
	}

	Vec4 Vec4::operator /= ( float a ) {
		X /= a;
		Y /= a;
		Z /= a;
		W /= a;
		return *this;
	}

	Vec4 Vec4::Normalize() {
		float len = Len();
		X /= len;
		Y /= len;
		Z /= len;
		W /= len;
		return *this;
	}
}
